<div class="bjui-pageHeader">
    <a href="{:U('Article/modelFieldAdd', array('modelid' => $modelid))}" class="btn btn-green" data-custom="priv" data-action="article/modelFieldAdd" data-toggle="dialog" data-width="900" data-height="420" data-id="dialog-mask" data-mask="true">{:L('add_field')}</a>
</div>
<div class="bjui-pageContent tableContent">
    <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
        <thead>
            <tr>
             <th width="70"><?php echo L('listorder') ?></th>
            <th width="90"><?php echo L('fieldname') ?></th>
            <th width="100"><?php echo L('cnames'); ?></th>
            <th width="100"><?php echo L('type'); ?></th>
            <th width="50"><?php echo L('system'); ?></th>
            <th width="50"><?php echo L('must_input'); ?></th>
            <th width="50"><?php echo L('search'); ?></th>
            <th width="50"><?php echo L('listorder'); ?></th>
            <th width="50"><?php echo L('contribute'); ?></th>
            <th ><?php echo L('operations_manage'); ?></th>
            </tr>
        </thead>
        <tbody>
            <foreach name="page_list" item="item" >
            <tr data-id="{$item.fieldid}">
                <td>{$item.listorder}</td>
                <td>{$item.field}</td>
                <td>{$item.name}</td>
                <td width="100" align='center'><?php echo $item['formtype']?></td>
                <td width="50" align='center'><?php echo $item['issystem'] ? L('icon_unlock') : L('icon_locked')?></td>
                <td width="50" align='center'><?php echo $item['minlength'] ? L('icon_unlock') : L('icon_locked')?></td>
                <td width="50" align='center'><?php echo $item['issearch'] ? L('icon_unlock') : L('icon_locked')?></td>
                <td width="50" align='center'><?php echo $item['isorder'] ? L('icon_unlock') : L('icon_locked')?></td>
                <td width="50" align='center'><?php echo $item['isadd'] ? L('icon_unlock') : L('icon_locked')?></td>
                <td align="center">
                    <a class="btn btn-green" href="{:U('Article/modelFieldEdit', ['modelid' => $item['modelid'], 'fieldid' => $item['fieldid']])}" data-toggle="dialog" data-width="900" data-height="420" data-id="article_edit" data-title="编辑-{$item.title}"><span>{:L('edit')}</span></a>
                    <?php if(!in_array($item['field'], $forbid_fields)) :?>
                    <a class="btn btn-green" href="{:U('Article/modelFieldDisable', ['modelid' => $item['modelid'], 'fieldid' => $item['fieldid']])}" data-toggle="doajax"><span><?php echo $item['disabled'] ? L('field_enabled') : L('field_disabled');?></span></a>
                    <?php else :?>
                        <button class="btn btn-default" ><span><?php echo L('field_disabled');?></span></button>
                    <?php endif;?>
                    <?php if(!in_array($item['field'], $forbid_delete)) :?>
                    <a class="btn btn-red" href="{:U('Article/modelFieldDelete', ['fieldid' => $item['fieldid'], 'modelid' => $item['modelid']])}" data-toggle="doajax" data-confirm-msg="{:L('confirm_delete')}"><span>{:L('delete')}</span></a>
                    <?php else :?>
                        <button class="btn btn-default" ><span><?php echo L('delete');?></span></button>
                    <?php endif;?>
                </td>
            </tr>
            </foreach>

        </tbody>
    </table>
</div>
